package edu.westga.vocalengineer.audio.transforms;

public class VolumeTransform implements ITransform {

	protected float volumeAmount;
	
	public VolumeTransform(float newVolumeAmount) {
		volumeAmount = newVolumeAmount;
	}
	
	@Override
	public short[] execute(short[] samples) {
		short[] filtered = new short[samples.length];
		for(int i = 0; i < samples.length; i++)
			filtered[i] = (short)((float)samples[i] * volumeAmount);
		return filtered;
	
	}

}
